package edu.utn.tacs.grupouno.dao.implementations;

import java.util.List;
import java.util.UUID;

import org.hibernate.Query;

import edu.utn.tacs.grupouno.dao.EstudiosDAO;
import edu.utn.tacs.grupouno.negocio.Estudio;

public class EstudiosDAOHibernate extends AbstractHibernateDAO implements EstudiosDAO {

	@Override
	public List<Estudio> getEstudios() {
		Query query = getSession().createQuery("from Estudio");
		return query.list();
	}

	@Override
	public Estudio getEstudio(String id) {
		return (Estudio) getSession().get(Estudio.class, UUID.fromString(id));
	}

}
